<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<title>易夫森管理系统</title>
		<link rel="stylesheet" type="text/css" href="css/yfs.css">
	</head>

	<body>
		<table width="900" align="center" height="100%" border="0" margin="0"
			padding="0" cellspacing="0" cellpadding="0">
			<tr>
				<td valign="top" width="100%" height="30" colspan="6">
					<img src="images/logo.jpg">
				</td>
			</tr>
			<tr valign="top">
				<td width="2px" bgcolor="#add2da">
					&nbsp;
				</td>
				<td align="left" width="30px">
					<jsp:include page="left.jsp"></jsp:include>
				</td>
				<td width="2px" bgcolor="#add2da">
					&nbsp;
				</td>
				<td valign="top" width="750">
					<form action="<%=path%>/addkey" method="post">
						&nbsp;&nbsp;
						<input type=text name="keyword" />
						<select name="type">
							<option value="0">
								bbs关键字
							</option>
							<option value="1">
								搜索关键字
							</option>
						</select>
						<input type="submit" value="添加关键字" />
					</form>
					<span>${msg }</span>
					<table>
						<tr>
							<th align="left" width=50%>
								关键字
							</th>
							<th width=20%>
								类型
							</th>
							<th width=20%>
								操作
							</th>
						</tr>
						<c:forEach items="${keylist}" var="kl">
							<tr>
								<td>
									${kl.keyword}
								</td>
								<td>
									<c:if test="${kl.type==0}">bbs</c:if>
									<c:if test="${kl.type==1}">搜索</c:if>
								</td>
								<td>
									<a href="<%=path%>/deleteKey?id=${kl.id}&&type=${kl.type}">删除</a>
								</td>
							</tr>
						</c:forEach>
					</table>
					<a href="<%=path%>/web/showkey?type=${type}&page=${pk-1}"><img
							src="images/pre.gif" border="none" />
					</a>
					<a href="<%=path%>/web/showkey?type=${type}&page=${pk+1}"><img
							src="images/next.gif" border="none" />
					</a>
				</td>
				<td width="2px" bgcolor="#add2da">
					&nbsp;
				</td>
			</tr>
		</table>
	</body>
</html>
